import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserListComponent } from './user-list/user-list.component';
import { UserHomeComponent } from './user-home/user-home.component';
import { UserInfoComponent } from './user-info/user-info.component';

const routes: Routes = [
  {
    path:'',
    component:UserHomeComponent,
    children: [
        {
            path:'',
            redirectTo:'userList',
            pathMatch:'full'
        },
        {
            path:'userList',
            component:UserListComponent
        },
        {
            path:'userInfo',
            component:UserInfoComponent
        }
    ]
}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class UserRoutingModule { }
